import QtQuick 2.0
import QtQml 2.12
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls 2.12
import QtQuick.Controls 1.4
Item {
    width: 240
    Component{
        id: btnStyle2;
        ButtonStyle {
            background: Rectangle {
                implicitWidth: 50;
                implicitHeight: 50;
                border.width: control.pressed ? 2 : 1;
                border.color: (control.pressed || control.hovered) ? "#00A060" : "#888888";
                radius: 10;
                gradient: Gradient {
                    GradientStop { position: 0 ; color: control.pressed ? "#cccccc" : "#e0e0e0"; }
                    GradientStop { position: 1 ; color: control.pressed ? "#aaa" : "#ccc"; }
                }
            }
        }
    }
    Grid{
        id:someOp
        anchors.fill: parent
        rows: 1;
        columns: 4;
        rowSpacing: 4;
        columnSpacing: 4;
        z: 1;
        Button {
            text:"打开"
            style: btnStyle2;
            onClicked: {
                root.toolFun("open")
            }
        }
        Button {
            text: "放大";
            style: btnStyle2;
            onClicked: {
                root.toolFun("in")
            }
        }
        Button {
            text: "缩小";
            style: btnStyle2;
            onClicked: {
                root.toolFun("out")
            }
        }
        Button {
            text: "恢复";
            style: btnStyle2;
            onClicked: {
                root.toolFun("reset")
            }
        }
    }
}
